<template>
    <div class="app-container">
        <!-- 基础信息 -->
        <h5 class="titleInfo">
            基础信息
        </h5>
        <el-form class="form" ref="form"  label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="手机号">
                        <span class="spanToInput">{{form.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="昵称">
                        <span class="spanToInput">{{form.nickName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="姓名">
                        <span class="spanToInput">{{form.realName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="交钱分公司">
                        <span class="spanToInput">{{form.branchName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="级别">
                        <span class="spanToInput">{{form.roleName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="账户类型">
                        <span class="spanToInput">{{form.type | typeNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="加盟金额">
                        <span class="spanToInput">{{list.joinAmount | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
 
        <!-- 推荐人信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            推荐人信息
        </h5>

            <el-row>
                <el-col :span="12">
                    <el-form-item label="推荐人姓名">
                        <span class="spanToInput">{{list.referName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="推荐人手机号">
                        <span class="spanToInput">{{list.referPhone | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
     
        <!-- 实名认证信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            实名认证信息
        </h5>

            <el-row>
                <el-col :span="12">
                    <el-form-item label="证件类型">
                        <span>{{form.cardType | cardNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="证件号码">
                        <span class="spanToInput">{{form.card | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        
        <!-- 银行卡信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            银行卡信息
        </h5>
       
            <el-row>
                <el-col :span="12">
                    <el-form-item label="银行名称">
                        <span class="spanToInput">{{list.banksDTOList.name | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="银行卡号">
                        <span class="spanToInput">{{list.banksDTOList.card | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>
<script>
import { getList,getInfo} from '@/api/designerManage'
export default {
    name:"designerManageInfo",
    data(){
        return {
            form:null,
            list:{
                referName:"",
                referPhone:"",
                banksDTOList:{
                    name:"",
                    card:""
                }
            },
            userId:null
        }
    },
    created(){
        this.form = JSON.parse(this.$route.query.userId);
        this.userId = this.form.userId
    },
    filters:{
        filterNull(e) {
            if(!e){
                return "暂无"
            }else{
                return e
            }
        },
        cardNull(e){
            return window.helper.cardType(String(e))
        },
        typeNull(e){
            return window.helper.accountType(String(e))
        }
    },
    mounted(){
        let datas = {
            userId:this.form.userId
        }
        getInfo(datas).then(res=>{
            this.list = res.data.data
            console.log(res)
        })
    }
}
</script>
<style scoped>
.app-container{padding: 0px!important}
</style>
